package org.example.flinksql.test.custom;

import org.apache.flink.table.annotation.DataTypeHint;
import org.apache.flink.table.functions.ScalarFunction;
import org.apache.flink.types.Row;

public class TransEidFunction extends ScalarFunction {

    public String eval(String eid) {
        return "eid-" + eid;
    }

    @DataTypeHint("ROW<eid STRING, name STRING, credit_no STRING, category_new INT, " +
            "regist_capi INT, actual_capi INT, status INT>")
    public Row eval(String eid, String name, String creditNo, Integer categoryNew, Integer registCapi,
                    Integer actualCapi, Integer status) {
        eid = "eid-" + eid;
        return Row.of(eid, name, creditNo, categoryNew, registCapi, actualCapi, status);
    }
}
